public class Computer {
    private USB[] usbArr = new USB[4];
    public void insertUsb(int index,USB usb){
        if(index>4||index<=0){
            System.out.println("USB接口超出范围");
        }else{
            usbArr[index-1]=usb;
            usb.service();
        }
    }//一台电脑拥有4个USB接口
}
